The model was initialised prior to the first observed data point by assuming constant exponential growth for the mean of assumed delays from infection to case report.
\begin{align} I_{t} &= I_0 \exp \left(r t \right) \ I_0 &\sim \mathcal{LN}(\log I_{obs}, 0.2) \ r &\sim \mathcal{LN}(r_{obs}, 0.2) \end{align}
Where $I_{obs}$ and $r_{obs}$ are estimated from the first week of observed data. For the time window of the observed data infections were then modelled by weighting previous infections by the generation time and scaling by the instantaneous reproduction number. These infections were then convolved to cases by date ($O_t$) and cases by date of report ($D_t$) using log-normal delay distributions. This model can be defined mathematically as follows,
\begin{align} \log R_{t} &= \log R_{t-1} + \mathrm{GP}t \ I_t &= R_t \sum{\tau = 1}^{15} w(\tau | \mu_{w}, \sigma_{w}) I_{t - \tau} \ O_t &= \sum_{\tau = 0}^{15} \xi_{O}(\tau | \mu_{\xi_{O}}, \sigma_{\xi_{O}}) I_{t-\tau} \ D_t &= \alpha \sum_{\tau = 0}^{15} \xi_{D}(\tau | \mu_{\xi_{D}}, \sigma_{\xi_{D}}) O_{t-\tau} \ C_t &\sim \mathrm{NB}\left(\omega_{(t \mod 7)}D_t, \phi\right) \end{align}
Where, \begin{align} w &\sim \mathcal{G}(\mu_{w}, \sigma_{w}) \ \xi_{O} &\sim \mathcal{LN}(\mu_{\xi_{O}}, \sigma_{\xi_{O}}) \ \xi_{D} &\sim \mathcal{LN}(\mu_{\xi_{D}}, \sigma_{\xi_{D}}) \end{align}
This model used the following priors for cases,
\begin{align} R_0 &\sim \mathcal{LN}(0.079, 0.18) \ \mu_w &\sim \mathcal{N}(3.6, 0.7) \ \sigma_w &\sim \mathcal{N}(3.1, 0.8) \ \mu_{\xi_{O}} &\sim \mathcal{N}(1.62, 0.064) \ \sigma_{\xi_{O}} &\sim \mathcal{N}(0.418, 0.069) \ \mu_{\xi_{D}} &\sim \mathcal{N}(0.614, 0.066) \ \sigma_{\xi_{D}} &\sim \mathcal{N}(1.51, 0.048) \ \alpha &\sim \mathcal{N}(0.25, 0.05) \ \frac{\omega}{7} &\sim \mathrm{Dirichlet}(1, 1, 1, 1, 1, 1, 1) \ \phi &\sim \frac{1}{\sqrt{\mathcal{N}(0, 1)}} \end{align}
and updated the reporting process as follows when forecasting deaths,
\begin{align} \mu_{\xi_{D}} &\sim \mathcal{N}(2.29, 0.076) \ \sigma_{\xi_{D}} &\sim \mathcal{N}(0.76, 0.055) \ \alpha &\sim \mathcal{N}(0.005, 0.0025) \end{align}
$\alpha$, $\mu$, $\sigma$, and $\phi$ were truncated to be greater than 0 and with $\xi$, and $w$ normalised to sum to 1.
The prior for the generation time was sourced from [@generationinterval] but refit using a log-normal incubation period with a mean of 5.2 days (SD 1.1) and SD of 1.52 days (SD 1.1) with this incubation period also being used as a prior [@incubationperiod] for $\xi_{O}$. This resulted in a gamma-distributed generation time with mean 3.6 days (standard deviation (SD) 0.7), and SD of 3.1 days (SD 0.8) for all estimates. We estimated the delay between symptom onset and case report or death required to convolve latent infections to observations by fitting an integer adjusted log-normal distribution to 10 subsampled bootstraps of a public linelist for cases in Germany from April 2020 to June 2020 with each bootstrap using 1% or 1769 samples of the available data [@kraemer2020epidemiological; @covidregionaldata] and combining the posteriors for the mean and standard deviation of the log-normal distribution [@epinow2; @epiforecasts.io/covidCovid19TemporalVariation2020; @EvaluatingUseReproduction; @rstan].
$GP_t$ is an approximate Hilbert space Gaussian process as defined in [@approxGP] using a Matern 3/2 kernel using a boundary factor of 1.5 and 17 basis functions (20% of the number of days used in fitting). The length scale of the Gaussian process was given a log-normal prior with a mean of 21 days, and a standard deviation of 7 days truncated to be greater than 3 days and less than 60 days. The magnitude of the Gaussian process was assumed to be normally distributed centred at 0 with a standard deviation of 0.1.
From the forecast time horizon ($T$) and onwards the last value of the Gaussian process was used (hence $R_t$ was assumed to be fixed) and latent infections were adjusted to account for the proportion of the population that was susceptible to infection as follows,
\begin{equation} I_t = (N - I^c_{t-1}) \left(1 - \exp \left(\frac{-I't}{N - I^c{T}}\right)\right), \end{equation}
where $I^c_t = \sum_{s< t} I_s$ are cumulative infections by $t-1$ and $I'_t$ are the unadjusted infections defined above. This adjustment is based on that implemented in the epidemia
R package [@epidemia; @bhattSemiMechanisticBayesianModeling].
The convolution model shares the same observation model as the renewal model but rather than assuming that an observation is predicted by itself using the renewal equation instead assumes that it is predicted entirely by another observation after some parametric delay. It can be defined mathematically as follows,
\begin{equation} D_{t} \sim \mathrm{NB}\left(\omega_{(t \mod 7)} \alpha \sum_{\tau = 0}^{30} \xi(\tau | \mu, \sigma) C_{t-\tau}, \phi \right) \end{equation}
with the following priors,
\begin{align} \frac{\omega}{7} &\sim \mathrm{Dirichlet}(1, 1, 1, 1, 1, 1, 1) \ \alpha &\sim \mathcal{N}(0.01, 0.02) \ \xi &\sim \mathcal{LN}(\mu, \sigma) \ \mu &\sim \mathcal{N}(2.5, 0.5) \ \sigma &\sim \mathcal{N}(0.47, 0.2) \ \phi &\sim \frac{1}{\sqrt{\mathcal{N}(0, 1)}} \end{align}
with $\alpha$, $\mu$, $\sigma$, and $\phi$ truncated to be greater than 0 and with $\xi$ normalised such that $\sum_{\tau = 0}^{30} \xi(\tau | \mu, \sigma) = 1$.
Both models were implemented using the EpiNow2
R package (version 1.3.3) [@epinow2]. Each forecast target was fitted independently for each model using Markov-chain Monte Carlo (MCMC) in stan [@rstan]. A minimum of 4 chains were used with a warmup of 250 samples for the renewal equation-based model and 1000 samples for the convolution model. 2000 samples total post warmup were used for the renewal equation model and 4000 samples for the convolution model. Different settings were chosen for each model to optimise compute time contingent on convergence. Convergence was assessed using the R hat diagnostic [@rstan]. For the convolution model forecast the case forecast from the renewal equation model was used in place of observed cases beyond the forecast horizon using 1000 posterior samples. 12 weeks of data was used for both models though only 3 weeks of data were included in the likelihood for the convolution model.
\clearpage
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.